This works for me: ---CMakeLists.txt---- cmake_minimum_required(VERSION 3.0 FATAL_ERROR) project(asm CXX) add_executable(foo foo.bar) set_source_files_properties(foo.bar PROPERTIES LANGUAGE CXX)
---foo.bar--- int main() { return 0;} $ /cygdrive/c/Program\ Files\ \(x86\)/CMake/bin/cmake -GNinja .. -- The CXX compiler identification is MSVC 16.0.40219.1 -- Check for working CXX compiler using: Ninja -- Check for working CXX compiler using: Ninja -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done -- Generating done -- Build files have been written to: C:/Users/hoffman/foo/b hoffman@quasar ~/foo/b $ ninja [1/2] Building CXX object CMakeFiles\foo.dir\foo.bar.obj foo.bar [2/2] Linking CXX executable foo.exe -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake