Coding Spirit

一位程序员,比较帅的那种

0%

CMake: Skip Compiler Check

CMake will try to check compiler is working or not if project language was set to C/CXX. However, sometimes we just want to skip this test…

Solution 1: Manually Set COMPILER_WORKS Flag

1
2
set(CMAKE_C_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER_WORKS 1)

Solution 2: Set project language to NONE

1
project(<PROJECT-NAME> NONE)