Threads package made totally optional. Would be found when not
authorMikhail Komarov <nemo1369@gmail.com>
Thu, 12 Jan 2017 02:27:02 +0000 (05:27 +0300)
committerMikhail Komarov <nemo1369@gmail.com>
Thu, 12 Jan 2017 02:27:02 +0000 (05:27 +0300)
crosscompiling and would not be when either.

CMakeLists.txt

index 66d71b5c60056516d4cb4a853509d750810de1ca..73a08be70df0e7f9bb3501fe085977370a5fda48 100644 (file)
@@ -17,11 +17,7 @@ option(WITH_BOOST_ATOMIC "Use boost atomics (only for boost >= 1.54)" OFF)
 option(WITH_ASAN "Build AddressSantinizer instrumented code" OFF)
 option(WITH_TSAN "Build ThreadSantinizer instrumented code" OFF)
 
-if(CMAKE_CROSSCOMPILING)
-    find_package(Threads)
-else()
-    find_package(Threads REQUIRED)
-endif()
+find_package(Threads)
 
 if(TARGET boost::system AND TARGET boost::thread)
     link_libraries(boost::system boost::thread)