Skip to content

Commit

Permalink
Add Cotire Pch + cling interpreter script
Browse files Browse the repository at this point in the history
- Generate a feel++ bash script that configure cling (system)
  use "-DCLING_PREFIX=/path/to/prefix/cling" if cling is installed in a non standard binary path.
- Add cotire to the project to generate precompiled headers (pch).
  Introduce FEELPP_ENABLE_PCH and FEELPP_ENABLE_PCH_APPLICATIONS
  options.
  • Loading branch information
gdolle committed Mar 6, 2017
1 parent c0e4252 commit cfc24bb
Show file tree
Hide file tree
Showing 10 changed files with 4,252 additions and 136 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -5,6 +5,8 @@ build/
*.log
*.orig
*.vim
*.pch
*.gch
/#CTestConfig.cmake#
/#ctest.make#
/.DS_Store
Expand Down
133 changes: 0 additions & 133 deletions cmake/modules/CustomPCH.cmake

This file was deleted.

42 changes: 42 additions & 0 deletions cmake/modules/FindCling.cmake
@@ -0,0 +1,42 @@
# - Find Feel
# This module looks for Feel (Library for the Finite Element Method) support
# it will define the following values
# CLING_FOUND = set if FEELPP has been found
# CLING_INCLUDE_DIR = where feel/feel.hpp can be found
# CLING_LIBRARY = the library to link in

find_path(CLING_INCLUDE_DIR ClingOptions.h
HINTS
${CLING_PREFIX}/include/cling/Interpreter
/usr/include/cling/Interpreter
/usr/local/include/cling/Interpreter
/opt/local/include/cling/Interpreter
NO_DEFAULT_PATH
)

find_library(CLING_LIBRARIES cling
HINTS
${CLING_PREFIX}/lib
/usr/lib
/usr/local/lib
/opt/local/lib
NO_DEFAULT_PATH
)

if( CLING_PREFIX )
message( STATUS, "[cling] prefix dir: ${CLING_PREFIX}" )
endif()

find_program(CLING_BIN cling
HINTS
${CLING_PREFIX}/bin
$PATH
CMAKE_SYSTEM_PROGRAM_PATH
)

message( STATUS "[cling] include dir: ${CLING_INCLUDE_DIR}" )
message( STATUS "[cling] libraries: ${CLING_LIBRARIES}" )
message( STATUS "[cling] binary: ${CLING_BIN}" )

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS( Cling REQUIRED_VARS CLING_BIN )

0 comments on commit cfc24bb

Please sign in to comment.