Skip to content

Commit cee570d

Browse files
committed
Merge branch 'master' of github.com:sandialabs/cambio
2 parents 40d4536 + f9ba00b commit cee570d

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ endif()
6969
set(THREADS_PREFER_PTHREAD_FLAG ON)
7070
find_package(Threads REQUIRED)
7171

72-
set( Boost_USE_STATIC_LIBS ON )
73-
set( CMAKE_FIND_LIBRARY_SUFFIXES .a .la .lib ${CMAKE_FIND_LIBRARY_SUFFIXES} )
72+
if( Boost_USE_STATIC_LIBS )
73+
set( CMAKE_FIND_LIBRARY_SUFFIXES .a .la .lib )
74+
endif()
7475

7576

7677
set( headers ${headers} cambio/Cambio_config.h.in )
@@ -87,7 +88,7 @@ if( BUILD_CAMBIO_GUI )
8788

8889
if(WIN32)
8990
find_package(Qt5 COMPONENTS WinExtras REQUIRED)
90-
else()
91+
elseif( APPLE )
9192
find_package(Qt5 COMPONENTS MacExtras REQUIRED)
9293
endif()
9394

@@ -148,6 +149,7 @@ endif( APPLE AND BUILD_CAMBIO_GUI )
148149
if( BUILD_CAMBIO_COMMAND_LINE )
149150
set( headers ${headers} cambio/CommandLineUtil.h )
150151
set( sources ${sources} src/CommandLineUtil.cpp )
152+
find_library( BOOST_PROGRAM_OPTIONS boost_program_options REQUIRED)
151153
endif( BUILD_CAMBIO_COMMAND_LINE )
152154

153155
if( NOT BUILD_CAMBIO_GUI AND NOT BUILD_CAMBIO_COMMAND_LINE )
@@ -157,12 +159,16 @@ endif( NOT BUILD_CAMBIO_GUI AND NOT BUILD_CAMBIO_COMMAND_LINE )
157159

158160
add_executable( ${PROJECT_NAME} ${GUI_TYPE} main.cpp ${sources} ${headers} )
159161

162+
if( BUILD_CAMBIO_COMMAND_LINE )
163+
target_link_libraries( ${PROJECT_NAME} PRIVATE ${BOOST_PROGRAM_OPTIONS} )
164+
endif()
165+
160166
if( NOT BUILD_CAMBIO_GUI )
161167
if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
162168
#Right now we are copying all of libpthread into our executable to force copying weak symbols in.
163169
# Instead, to save size should specify the functions we actually need using '-u pthread_create', etc.
164170
# Could maybe add a "-no_weak_exports" flag to the linker as well to make sure none missing.
165-
set( CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "-static -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive")
171+
set( CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "-pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive")
166172
target_link_libraries( ${PROJECT_NAME} PRIVATE -static-libgcc -static-libstdc++ )
167173
endif( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
168174
endif( NOT BUILD_CAMBIO_GUI )

src/FileDetailWidget.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include "SpecUtils/SpecFile.h"
4545
#include "cambio/FileDetailTools.h"
4646
#include "cambio/FileDetailWidget.h"
47+
#include <cfloat>
4748

4849
using namespace std;
4950

src/SpectrumView.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <cmath>
2121
#include <limits>
2222
#include <iostream>
23+
#include <cfloat>
2324

2425
#include <QtCharts/QChart>
2526
#include <QBrush>

0 commit comments

Comments
 (0)