Changeset 610c20cc in OpenModelica


Ignore:
Timestamp:
2020-10-21T14:04:16+02:00 (4 years ago)
Author:
Mahder Gebremedhin <mahder.gebremedhin@…>
Children:
e3138910
Parents:
66a59d6d
git-author:
Mahder Gebremedhin <mahder.gebremedhin@…> (09/14/20 14:40:45)
git-committer:
Mahder Gebremedhin <mahder.gebremedhin@…> (10/21/20 14:04:16)
Message:

[cmake] Disallow implicit function declaration.

  • implicit function declaration should be forbidden for all C source files. We want to be strict with include headers and directories. If implicit declaration is allowed for C sources it messes things up and makes it difficult to track what comes from where.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/CMakeLists.txt

    r66a59d6d r610c20cc  
    1919omc_add_to_report(CMAKE_BUILD_TYPE)
    2020
     21# We want to make sure include directories are handled properly. C allows implicit function
     22# declaration. We have to disable that so that we can be consistent and correct with our inclusions.
     23if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
     24    add_compile_options(-Werror=implicit-function-declaration)
     25endif()
     26
    2127
    2228# options
Note: See TracChangeset for help on using the changeset viewer.