Remove enable_language from language modules

Notice that cxx.cmake reference, incorrectly, CMAKE_C_COMPILER instead of CMAKE_CXX_COMPILER
This commit is contained in:
Roberto Di Remigio
2017-04-07 17:58:52 +02:00
parent 28b9ba022c
commit 98ba4cf3b2
6 changed files with 13 additions and 13 deletions

View File

@ -25,8 +25,6 @@
# export: "'CC={0}'.format(arguments['--cc'])"
# define: "'-DEXTRA_CFLAGS=\"{0}\"'.format(arguments['--extra-cc-flags'])"
enable_language(C)
if(NOT DEFINED CMAKE_C_COMPILER_ID)
message(FATAL_ERROR "CMAKE_C_COMPILER_ID variable is not defined!")
endif()

View File

@ -25,14 +25,12 @@
# export: "'CXX={0}'.format(arguments['--cxx'])"
# define: "'-DEXTRA_CXXFLAGS=\"{0}\"'.format(arguments['--extra-cxx-flags'])"
enable_language(CXX)
if(NOT DEFINED CMAKE_C_COMPILER_ID)
message(FATAL_ERROR "CMAKE_C_COMPILER_ID variable is not defined!")
if(NOT DEFINED CMAKE_CXX_COMPILER_ID)
message(FATAL_ERROR "CMAKE_CXX_COMPILER_ID variable is not defined!")
endif()
if(NOT CMAKE_C_COMPILER_WORKS)
message(FATAL_ERROR "CMAKE_C_COMPILER_WORKS is false!")
if(NOT CMAKE_CXX_COMPILER_WORKS)
message(FATAL_ERROR "CMAKE_CXX_COMPILER_WORKS is false!")
endif()
if(DEFINED EXTRA_CXXFLAGS)

View File

@ -29,8 +29,6 @@
# export: "'FC={0}'.format(arguments['--fc'])"
# define: "'-DEXTRA_FCFLAGS=\"{0}\"'.format(arguments['--extra-fc-flags'])"
enable_language(Fortran)
set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/modules)
include_directories(${PROJECT_BINARY_DIR}/modules)