diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a405ea..088ba4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.16 FATAL_ERROR) # ---[ Project -PROJECT(FP16 C CXX) +PROJECT(FP16 C) # ---[ Options. OPTION(FP16_BUILD_TESTS "Build FP16 unit tests" ON) @@ -9,6 +9,10 @@ OPTION(FP16_BUILD_BENCHMARKS "Build FP16 micro-benchmarks" ON) OPTION(FP16_BUILD_COMPARATIVE_BENCHMARKS "Build FP16 micro-benchmarks comparing to alternatives" OFF) # ---[ CMake options +IF(FP16_BUILD_TESTS OR FP16_BUILD_BENCHMARKS) + ENABLE_LANGUAGE(CXX) +ENDIF() + IF(FP16_BUILD_TESTS) ENABLE_TESTING() ENDIF()