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)