Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Top level CMake file

# Set the minimum version of CMake required to run properly
cmake_minimum_required(VERSION 3.0.0)

# Set the project name
project(ALARA VERSION 2.7.1)

# Add all subdirectories
# add_subdirectory(data)
# add_subdirectory(developer-info)
# add_subdirectory(doc)
# add_subdirectory(sample)
add_subdirectory(src)
# add_subdirectory(tools)


Empty file added data/CMakeLists.txt
Empty file.
Empty file added developer-info/CMakeLists.txt
Empty file.
Empty file added doc/CMakeLists.txt
Empty file.
15 changes: 15 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# src directory CMake file

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")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't use this variable, so probably don't need this line.

FILE(GLOB c_files "${CMAKE_CURRENT_SOURCE_DIR}/*.C")
SET(EXECUTABLES ${c_files})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SET(EXECUTABLES ${c_files})
SET(SOURCE_FILES ${c_files})


# Add the Data Library
add_subdirectory(DataLib)

# Add all source files
add_executable(alara ${EXECUTABLES})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to match the change above

Suggested change
add_executable(alara ${EXECUTABLES})
add_executable(alara ${SOURCE_FILES})

target_link_libraries(alara DataLib)
10 changes: 10 additions & 0 deletions src/DataLib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# CMake file in the DataLib direcotry within the src directory

FILE(GLOB h_files "${CMAKE_CURRENT_SOURCE_DIR}/*.h")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure that you need h_files defined.

FILE(GLOB c_files "${CMAKE_CURRENT_SOURCE_DIR}/*.C")
FILE(GLOB cpp_files "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
SET(DATA_LIB_SOURCES ${c_files} ${cpp_files})


# Add the library
add_library(DataLib SHARED ${DATA_LIB_SOURCES})
1 change: 1 addition & 0 deletions src/DataLib/alara.h
2 changes: 1 addition & 1 deletion src/input.C
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* $Id: input.C,v 1.14 2007-12-20 22:03:56 wilsonp Exp $ */
#include "alara.h"
#include "input_tokens.h"
#include "dflt_datadir.h"
//#include "dflt_datadir.h"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we successfully figured out how to generate this file with CMake as we were doing with autotools?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

#include <sys/types.h>
#include <sys/stat.h>

Expand Down
2 changes: 2 additions & 0 deletions src/version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define VERSION "2.7.1"

4 changes: 4 additions & 0 deletions src/version.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#define VERSION "@ALARA_VERSION_MAJOR@.@ALARA_VERSION_MINOR@.@ALARA_VERSION_PATCH@"
#define PACKAGE_STRING "ALARA " VERSION
#define DFLT_XSDIR "$(xsdir)"
#define DFLT_DATADIR "$(nonxsdir)"
Empty file added tools/CMakeLists.txt
Empty file.