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
No known key found for this signature in database
GPG Key ID: E4FADFE6DFB29C6E
6 changed files with 13 additions and 13 deletions

View File

@ -55,12 +55,15 @@ matrix:
- os: osx - os: osx
osx_image: xcode6.4 osx_image: xcode6.4
compiler: gcc compiler: gcc
env: SOURCES=homebrew env:
- SOURCES=homebrew
- HOMEBREW_GCC='homebrew/versions/gcc48'
install: install:
- | - |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
brew install cmake boost python gcc open-mpi brew install cmake boost python open-mpi
brew reinstall ${HOMEBREW_GCC}
pip install virtualenv pip install virtualenv
elif [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then elif [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
pip install --user virtualenv pip install --user virtualenv

View File

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

View File

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

View File

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

View File

@ -1,6 +1,8 @@
name: example name: example
min_cmake_version: 2.8 min_cmake_version: 2.8
language: CXX language:
- CXX
- C
default_build_type: debug default_build_type: debug
modules: modules:
- cxx: - cxx:

View File

@ -1,5 +1,6 @@
name: example name: example
min_cmake_version: 2.8 min_cmake_version: 2.8
language: CXX
default_build_type: debug default_build_type: debug
modules: modules:
- cxx: - cxx: