Make CMakeLists.txt compatible with CMake 3.3 (#4420)

* Make CMakeLists.txt compatible with CMake 3.3; require CMake 3.11 for MSVC

* Use CMake 3.12 when sanitizer is enabled

* Disable funroll-loops for MSVC

* Use cmake version in container name

* Add missing arg

* Fix egrep use in ci_build.sh

* Display CMake version

* Do not set OpenMP_CXX_LIBRARIES for MSVC

* Use cmake_minimum_required()
This commit is contained in:
Philip Hyunsu Cho
2019-05-02 11:49:32 +08:00
committed by Jiaming Yuan
parent 17df5fd296
commit bfddc2c42c
6 changed files with 26 additions and 9 deletions
+3
View File
@@ -44,6 +44,9 @@ set_target_properties(
testxgboost PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED ON)
if ((NOT OpenMP_CXX_LIBRARIES) AND (NOT MSVC)) # old CMake doesn't define this variable
set(OpenMP_CXX_LIBRARIES "gomp;pthread")
endif ((NOT OpenMP_CXX_LIBRARIES) AND (NOT MSVC))
target_link_libraries(testxgboost
PRIVATE
${GTEST_LIBRARIES}