Skip to content

Commit

Permalink
Msvc static lib changes rebased (shibatch#330)
Browse files Browse the repository at this point in the history
Co-authored-by: shibatch <[email protected]>
  • Loading branch information
shibatch and shibatch authored Aug 31, 2020
1 parent c666f3b commit 3a078bb
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ option(ENABLE_ALTSQRT "Enable alternative sqrt method (aarch64 only)" OFF)

option(DISABLE_FFTW "Disable testing the DFT library with FFTW" OFF)

# See doc/build-with-cmake.md for instructions on how to build Sleef.
cmake_minimum_required(VERSION 3.4.3)

# Set to NEW when updating cmake_minimum_required to VERSION >= 3.7.2
if(${CMAKE_VERSION} VERSION_GREATER "3.7.1")
cmake_policy(SET CMP0066 OLD)
endif()

if(${CMAKE_VERSION} VERSION_GREATER "3.14.99")
cmake_policy(SET CMP0091 NEW)
endif()

enable_testing()

set(SLEEF_VERSION_MAJOR 3)
Expand Down
1 change: 1 addition & 0 deletions Configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ endif()

if (NOT BUILD_SHARED_LIBS)
set(COMMON_TARGET_DEFINITIONS SLEEF_STATIC_LIBS=1)
set(SLEEF_STATIC_LIBS 1)
endif()

if (COMPILER_SUPPORTS_WEAK_ALIASES)
Expand Down
16 changes: 16 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,22 @@ pipeline {
'''
}
}

stage('clang-6.0') {
agent { label 'clang-6' }
steps {
sh '''
echo "clang-6.0 on" `hostname`
export CC=clang-6.0
rm -rf build
mkdir build
cd build
cmake -GNinja -DBUILD_QUAD=TRUE -DBUILD_INLINE_HEADERS=TRUE ..
ninja
ctest -j `nproc`
'''
}
}
}
}
}
Expand Down
13 changes: 4 additions & 9 deletions sleef-config.h.in
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
// Configuration of @PROJECT_NAME@ /////////////////////////////////////////////

#ifndef CONFIG_H
#define CONFIG_H
#ifndef SLEEF_CONFIG_H
#define SLEEF_CONFIG_H

#define SLEEF_VERSION_MAJOR @SLEEF_VERSION_MAJOR@
#define SLEEF_VERSION_MINOR @SLEEF_VERSION_MINOR@

// FEATURE DETECTION ***********************************************************
#cmakedefine SLEEF_STATIC_LIBS

#cmakedefine COMPILER_SUPPORTS_LONG_DOUBLE
#cmakedefine COMPILER_SUPPORTS_FLOAT128

#cmakedefine COMPILER_SUPPORTS_SSE2

#endif // CONFIG_H
#endif // SLEEF_CONFIG_H

0 comments on commit 3a078bb

Please sign in to comment.