Conversation
gonuke
left a comment
There was a problem hiding this comment.
Assuming that we'll use a series of different PRs, it's probably best to remove the empty CMakeLists.txt files that have been added here.
We also need to decide how we'll properly set the default data directory and VERSION using CMake.
src/CMakeLists.txt
Outdated
|
|
||
| FILE(GLOB h_files "${CMAKE_CURRENT_SOURCE_DIR}/*.h") | ||
| FILE(GLOB c_files "${CMAKE_CURRENT_SOURCE_DIR}/*.C") | ||
| SET(EXECUTABLES ${c_files}) |
There was a problem hiding this comment.
| SET(EXECUTABLES ${c_files}) | |
| SET(SOURCE_FILES ${c_files}) |
src/CMakeLists.txt
Outdated
| add_subdirectory(DataLib) | ||
|
|
||
| # Add all source files | ||
| add_executable(alara ${EXECUTABLES}) |
There was a problem hiding this comment.
to match the change above
| add_executable(alara ${EXECUTABLES}) | |
| add_executable(alara ${SOURCE_FILES}) |
src/input.C
Outdated
| #include "alara.h" | ||
| #include "input_tokens.h" | ||
| #include "dflt_datadir.h" | ||
| //#include "dflt_datadir.h" |
There was a problem hiding this comment.
Have we successfully figured out how to generate this file with CMake as we were doing with autotools?
There was a problem hiding this comment.
I think we have put this info in config.h instead (that is current generated from version.h.in). We can probably delete this line.
gonuke
left a comment
There was a problem hiding this comment.
This is looking pretty good. A few additional comments:
- I think we should rename
version.h.intoconfig.h.insince it is used to generateconfig.h. Be sure to update the line insrc/CMakeLists.txtas well - We can delete
version.hentirely as we no longer use it - I don't think we need the symbolic link from
src/DataLib/alara.htosrc/alara.h. If something isn't working we probably need to fix it in CMake
4 .We probably need to add CMake options to setxsdirandnonxsdirso that they can be set properly inconfig.h
src/CMakeLists.txt
Outdated
| include_directories(${CMAKE_CURRENT_SOURCE_DIR}) | ||
| configure_file(version.h.in "${CMAKE_CURRENT_SOURCE_DIR}/config.h") | ||
|
|
||
| FILE(GLOB h_files "${CMAKE_CURRENT_SOURCE_DIR}/*.h") |
There was a problem hiding this comment.
You don't use this variable, so probably don't need this line.
src/input.C
Outdated
| #include "alara.h" | ||
| #include "input_tokens.h" | ||
| #include "dflt_datadir.h" | ||
| //#include "dflt_datadir.h" |
There was a problem hiding this comment.
I think we have put this info in config.h instead (that is current generated from version.h.in). We can probably delete this line.
|
@gonuke I believe everything is done but before I push just wanted to clarify two things from the latest comments you had made.
|
|
The symbolic link looks like an extra file that appears in the repository. It's actually not directly related to your changes, but I think that your changes make it less necessary. You should be able to set the value of |
gonuke
left a comment
There was a problem hiding this comment.
This is getting close but we need to discuss "DFLT_XSDIR" and "DFLT_DATADIR"
| add_executable(alara ${SOURCE_FILES}) | ||
| target_link_libraries(alara DataLib) | ||
|
|
||
| # Set direcotry variable names |
There was a problem hiding this comment.
typo
| # Set direcotry variable names | |
| # Set directory variable names |
| target_link_libraries(alara DataLib) | ||
|
|
||
| # Set direcotry variable names | ||
| set(DFLT_XSDIR ${xsdir}) |
There was a problem hiding this comment.
I don't think this will do what it needs to do - we should discuss (see note in Slack)
| @@ -0,0 +1,10 @@ | |||
| # CMake file in the DataLib direcotry within the src directory | |||
|
|
|||
| FILE(GLOB h_files "${CMAKE_CURRENT_SOURCE_DIR}/*.h") | |||
There was a problem hiding this comment.
Not sure that you need h_files defined.
So far I have successfully built the
srcdirectory using CMake. The next step is to do the same for the rest of the sub directories.