Re: [CMake] cmake create executable Undefined symbols for architecture x86_64:

2017-07-11 Thread Sean Wayland
Thanks Micha,
The head developer managed to get it to compile under clion on the
weekend, I suspect he may have cleaned up his source code a little
bit. I also suspect listing the source code and targeted libraries in
the correct order may have helped. Thanks for all your help!
Best Sean

On Mon, Jul 10, 2017 at 3:22 PM, Micha Hergarden
<micha.hergar...@gmail.com> wrote:
> On 07-07-17 05:14, Sean Wayland wrote:
>> Hi Micha,
>> Thanks very much for the email. That seemed to make a small
>> difference! With both those lines commented out these errors are
>> generated ( below my email ) .
>> I still have included
>> project(CATSMAT)
>> at the top line of the cmake file in the catsmat directory
>>
>> I tried commenting out each of those language type definitions
>> separately but it didn't seem to help.
>> The code compiles under xcode. Those language types ( C++14) are
>> specified in Xcode so I was trying to find a way to copy what is in
>> xcode.
>>
>> Is there a maximum number of "errors" before the clion compiler will
>> spit the dummy ?
>>
>> Another executable will compile with lots and lots of warnings but no 
>> "errors"
>>
>> I don't know much about C++ unfortunately. These errors look like
>> simple errors which I could see might be generated if the syntax of
>> the language had changed slightly from one version to the next ..
>>
>> Thanks for you help!
>>
>> Sean
>>
>>
>> /Users/seanwayland/Desktop/CATSMAT-master/catsmat/catsmat/cmake/../../libIMUSANT/DomainObjects/inc/IMUSANT_interval.h:78:14:
>> error: ISO C++ forbids forward references to 'enum' types
>>
>> enum direction : int { descending=-1, repeat=0, ascending = 1,
>> vertical_bottomtotop };
>>
>>
>> /Users/seanwayland/Desktop/CATSMAT-master/catsmat/catsmat/cmake/../../libIMUSANT/DomainObjects/inc/IMUSANT_interval.h:78:30:
>> error: expected '(' for function-style cast or type construction
>>
>> enum direction : int { descending=-1, repeat=0, ascending = 1,
>> vertical_bottomtotop };
>>
>>  ~~~ ^
>>
>> /Users/seanwayland/Desktop/CATSMAT-master/catsmat/catsmat/cmake/../../libIMUSANT/DomainObjects/inc/IMUSANT_interval.h:78:24:
>> error: field has incomplete type 'enum direction'
>>
>> enum direction : int { descending=-1, repeat=0, ascending = 1,
>> vertical_bottomtotop };
>>
>>
>> /Users/seanwayland/Desktop/CATSMAT-master/catsmat/catsmat/cmake/../../libIMUSANT/DomainObjects/inc/IMUSANT_interval.h:78:14:
>> error: ISO C++ forbids forward references to 'enum' types
>>
>> enum direction : int { descending=-1, repeat=0, ascending = 1,
>> vertical_bottomtotop };
>>
>>  ^
>>
>> /Users/seanwayland/Desktop/CATSMAT-master/catsmat/catsmat/cmake/../../libIMUSANT/DomainObjects/inc/IMUSANT_interval.h:78:30:
>> error: expected '(' for function-style cast or type construction
>>
>> enum direction : int { descending=-1, repeat=0, ascending = 1,
>> vertical_bottomtotop };
>>
>>  ~~~ ^
>>
>> /Users/seanwayland/Desktop/CATSMAT-master/catsmat/catsmat/cmake/../../libIMUSANT/DomainObjects/inc/IMUSANT_interval.h:78:24:
>> error: field has incomplete type 'enum direction'
>>
>> enum direction : int { descending=-1, repeat=0, ascending = 1,
>> vertical_bottomtotop };
>>
>>^
>>
>> /Users/seanwayland/Desktop/CATSMAT-master/catsmat/catsmat/cmake/../../libIMUSANT/DomainObjects/inc/IMUSANT_interval.h:78:14:
>> note: forward declaration of 'IMUSANT::direction'
>>
>> enum direction : int { descending=-1, repeat=0, ascending = 1,
>> vertical_bottomtotop };
>>
>>  ^
>>
>> /Users/seanwayland/Desktop/CATSMAT-master/catsmat/catsmat/cmake/../../libIMUSANT/DomainObjects/inc/IMUSANT_interval.h:80:14:
>> error: ISO C++ forbids forward references to 'enum' types
>>
>> enum basic : int { unison = 0, second=1, third, fourth, fifth,
>> sixth, seventh };
>>
>>  ^
>>
>> /Users/seanwayland/Desktop/CATSMAT-master/catsmat/catsmat/cmake/../../libIMUSANT/DomainObjects/inc/IMUSANT_interval.h:80:26:
>> error: expected '(' for function-style cast or type construction
>>
>> enum basic : int { unison = 0, second=1, third, fourth, fifth,
>> sixth, seventh };
>>
>>  ~~~ ^
>>
>> /Users/seanwayland/Desktop/CATSMAT-master/catsmat/catsmat/cmake/../../libIMUSANT/DomainObjects/inc/IMUSA

Re: [CMake] cmake create executable Undefined symbols for architecture x86_64:

2017-07-06 Thread Sean Wayland
^



22 warnings and 12 errors generated.

make[3]: *** 
[catsmat/catsmat/cmake/CMakeFiles/catsmat.dir/__/Application/CATSMAT_main.cpp.o]
Error 1

make[2]: *** [catsmat/catsmat/cmake/CMakeFiles/catsmat.dir/all] Error 2

make[1]: *** [catsmat/catsmat/cmake/CMakeFiles/catsmat.dir/rule] Error 2

On Thu, Jul 6, 2017 at 3:12 PM, Micha Hergarden
<micha.hergar...@gmail.com> wrote:
> On 06-07-17 15:59, Sean Wayland wrote:
>> Hi Micha,
>> Thanks very much I tried that .. I added it to the application
>> directory cmakelists.txt file . Same issue .. It's already in the top
>> level cmake file which looks like this ..
>>
>> project(CATSMAT)
>> cmake_minimum_required(VERSION 3.6.3)
>>
>>
>> if (APPLE)
>>
>> set(CMAKE_C++_FLAGS -mmacosx-version-min=10.4)
>> endif (APPLE)
>>
>>
>> include_directories("catsmat/libIMUSANT")
>>
>> add_subdirectory (catsmat/googletest-master/googletest)
>> add_subdirectory (catsmat/libMusicXMLv3/libmusicxml-3.00-src/cmake)
>> add_subdirectory (catsmat/libIMUSANT/cmake)
>> add_subdirectory (catsmat/libIMUSANT_Tests/cmake)
>> add_subdirectory (catsmat/catsmat/cmake)
>>
>> set(CMAKE_CXX_STANDARD 14)
>>
>> On Thu, Jul 6, 2017 at 2:48 AM, Micha Hergarden
>> <micha.hergar...@gmail.com> wrote:
>>> On 05-07-17 22:50, Sean Wayland wrote:
>>>> I am attempting to write a cmakelists.txt file for an application.
>>>> The application has a couple of dependencies.
>>>> I have been able to build targets for the dependencies but when I try
>>>> and add an executable for the main application I encounter this error.
>>>>
>>>> Undefined symbols for architecture x86_64:
>>>>
>>>>   "_main", referenced from:
>>>>
>>>>  implicit entry/start for main executable
>>>>
>>>> ld: symbol(s) not found for architecture x86_64
>>>>
>>>> clang: error: linker command failed with exit code 1 (use -v to see 
>>>> invocation)
>>>>
>>>>
>>>> Googling the error and looking on stack exchange suggests that I don't
>>>> have a main function in the implicit entry/start .
>>>>
>>>> Where does it look for this function ?
>>>> Does that file need to be first in the list of sources ?
>>>>
>>>>
>>>>
>>>> This function is included here :
>>>> ${CATSMAT_DIR}/Application/CATSMAT_main.cpp
>>>>
>>>> My cmake file is below.
>>>>
>>>> Any advice would be appreciated I have been stuck here for a while!
>>>>
>>>> Best Sean
>>>>
>>>>
>>>> ###
>>>> # CMAKE CATSTMAT
>>>> ###
>>>> cmake_minimum_required(VERSION 3.6.3)
>>>> set(CMAKE_CXX_STANDARD 14)
>>>> if(CMAKE_CONFIGURATION_TYPES)
>>>> set(CMAKE_CONFIGURATION_TYPES Debug Release)
>>>> endif()
>>>>
>>>> if(UNIX)
>>>> add_definitions(-Wall -DGCC)
>>>> endif(UNIX)
>>>>
>>>> # RPATH SETTING #
>>>> set(CMAKE_MACOSX_RPATH 1)
>>>>
>>>> #if(APPLE)
>>>> # set (CMAKE_OSX_ARCHITECTURES "x86_64 i386")
>>>> # if (${CMAKE_SYSTEM_VERSION} VERSION_LESS 9.0.0)
>>>> # set (CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk)
>>>> # elseif (${CMAKE_SYSTEM_VERSION} VERSION_LESS 10.8.0)
>>>> # set (CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
>>>> # elseif (${XCODE_VERSION} VERSION_LESS 4.0.0)
>>>> # set (CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
>>>> # else ()
>>>> # set (CMAKE_OSX_SYSROOT "macosx10.7")
>>>> # endif ()
>>>> # set (CMAKE_C++_FLAGS -mmacosx-version-min=10.4)
>>>> #endif(APPLE)
>>>> #
>>>> #if(WIN32)
>>>> # add_definitions(-DWINVER=0x0400 -DWIN32)
>>>> # if(${CMAKE_GENERATOR} STREQUAL "Visual Studio 6")
>>>> #  add_definitions(-DVC6)
>>>> # elseif(${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005")
>>>> #  add_definitions(-DVC2005)
>>>> # endif(${CMAKE_GENERATOR} STREQUAL "Visual Studio 6")
>>>> #endif(WIN32)
>>>>
>>>> ###  BOOST LIBRARIES ###
>>>> if (APPLE)
>>>> set(BOOST_ROOT "/usr/local/boost")
>

Re: [CMake] cmake create executable Undefined symbols for architecture x86_64:

2017-07-06 Thread Sean Wayland
Hi Micha,
Thanks very much I tried that .. I added it to the application
directory cmakelists.txt file . Same issue .. It's already in the top
level cmake file which looks like this ..

project(CATSMAT)
cmake_minimum_required(VERSION 3.6.3)


if (APPLE)

set(CMAKE_C++_FLAGS -mmacosx-version-min=10.4)
endif (APPLE)


include_directories("catsmat/libIMUSANT")

add_subdirectory (catsmat/googletest-master/googletest)
add_subdirectory (catsmat/libMusicXMLv3/libmusicxml-3.00-src/cmake)
add_subdirectory (catsmat/libIMUSANT/cmake)
add_subdirectory (catsmat/libIMUSANT_Tests/cmake)
add_subdirectory (catsmat/catsmat/cmake)

set(CMAKE_CXX_STANDARD 14)

On Thu, Jul 6, 2017 at 2:48 AM, Micha Hergarden
<micha.hergar...@gmail.com> wrote:
> On 05-07-17 22:50, Sean Wayland wrote:
>> I am attempting to write a cmakelists.txt file for an application.
>> The application has a couple of dependencies.
>> I have been able to build targets for the dependencies but when I try
>> and add an executable for the main application I encounter this error.
>>
>> Undefined symbols for architecture x86_64:
>>
>>   "_main", referenced from:
>>
>>  implicit entry/start for main executable
>>
>> ld: symbol(s) not found for architecture x86_64
>>
>> clang: error: linker command failed with exit code 1 (use -v to see 
>> invocation)
>>
>>
>> Googling the error and looking on stack exchange suggests that I don't
>> have a main function in the implicit entry/start .
>>
>> Where does it look for this function ?
>> Does that file need to be first in the list of sources ?
>>
>>
>>
>> This function is included here :
>> ${CATSMAT_DIR}/Application/CATSMAT_main.cpp
>>
>> My cmake file is below.
>>
>> Any advice would be appreciated I have been stuck here for a while!
>>
>> Best Sean
>>
>>
>> ###
>> # CMAKE CATSTMAT
>> ###
>> cmake_minimum_required(VERSION 3.6.3)
>> set(CMAKE_CXX_STANDARD 14)
>> if(CMAKE_CONFIGURATION_TYPES)
>> set(CMAKE_CONFIGURATION_TYPES Debug Release)
>> endif()
>>
>> if(UNIX)
>> add_definitions(-Wall -DGCC)
>> endif(UNIX)
>>
>> # RPATH SETTING #
>> set(CMAKE_MACOSX_RPATH 1)
>>
>> #if(APPLE)
>> # set (CMAKE_OSX_ARCHITECTURES "x86_64 i386")
>> # if (${CMAKE_SYSTEM_VERSION} VERSION_LESS 9.0.0)
>> # set (CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk)
>> # elseif (${CMAKE_SYSTEM_VERSION} VERSION_LESS 10.8.0)
>> # set (CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
>> # elseif (${XCODE_VERSION} VERSION_LESS 4.0.0)
>> # set (CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
>> # else ()
>> # set (CMAKE_OSX_SYSROOT "macosx10.7")
>> # endif ()
>> # set (CMAKE_C++_FLAGS -mmacosx-version-min=10.4)
>> #endif(APPLE)
>> #
>> #if(WIN32)
>> # add_definitions(-DWINVER=0x0400 -DWIN32)
>> # if(${CMAKE_GENERATOR} STREQUAL "Visual Studio 6")
>> #  add_definitions(-DVC6)
>> # elseif(${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005")
>> #  add_definitions(-DVC2005)
>> # endif(${CMAKE_GENERATOR} STREQUAL "Visual Studio 6")
>> #endif(WIN32)
>>
>> ###  BOOST LIBRARIES ###
>> if (APPLE)
>> set(BOOST_ROOT "/usr/local/boost")
>> set(BOOST_FILESYSTEM_LIB  /usr/local/boost/lib/libboost_filesystem.dylib)
>> set(BOOST_SYSTEM_LIB  /usr/local/boost/lib/libboost_system.dylib)
>>
>> else (NOT APPLE)
>> set(BOOST_ROOT "C:/local/boost_1_58_0")
>> set(BOOST_FILESYSTEM_LIB  C:/local/boost_1_58_0/lib64-msvc-12.0)
>> set(BOOST_SYSTEM_LIB  C:/local/boost_1_58_0/lib64-msvc-12.0)
>> endif (APPLE)
>>
>> FIND_PACKAGE( Boost 1.58.0 REQUIRED  )
>> INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
>>
>>
>> ###
>> # set directories, src and headers.
>>
>> set (CATSMAT_DIR
>> /Users/seanwayland/Desktop/CATSMAT-master/catsmat/catsmat )
>> set (libIMUSANT_DIR${CMAKE_CURRENT_SOURCE_DIR}/../../libIMUSANT)
>> set (LOKI_DIR   ${CMAKE_CURRENT_SOURCE_DIR}/../../Loki)
>> set (SUFFIX_TREE_DIR${CMAKE_CURRENT_SOURCE_DIR}/../../SuffixTree)
>> set (GOOGLE_TEST_INC_DIR
>> ${CMAKE_CURRENT_SOURCE_DIR}/../../googletest-master/googletest/include)
>> set (IMUSANT_DIR${CMAKE_CURRENT_SOURCE_DIR}/../../libIMUSANT)
>>
>>
>> set (LIBMUSICXML_DIR${CMAKE_CURRENT_SOURCE_DIR}/../../libMusicXMLv3)
>>

[CMake] cmake create executable Undefined symbols for architecture x86_64:

2017-07-05 Thread Sean Wayland
ATSMAT_DIR}/Segmentation/IMUSANT_set_of_segment.cpp

${CATSMAT_DIR}/Segmentation/FixedPeriodDetection/src/IMUSANT_fixed_period_segmenter.cpp
${CATSMAT_DIR}/Segmentation/FixedPeriodDetection/src/IMUSANT_partlist_ordered_by_part_entry.cpp
${CATSMAT_DIR}/Segmentation/FixedPeriodDetection/src/IMUSANT_segmented_part_fixed_period.cpp
${CATSMAT_DIR}/Segmentation/FixedPeriodDetection/src/SegmentedScoreFixedPeriod.cpp

${CATSMAT_DIR}/Segmentation/LocalBoundaryDetectionModel/src/IMUSANT_interval_profile_LBDM.cpp
${CATSMAT_DIR}/Segmentation/LocalBoundaryDetectionModel/src/IMUSANT_LBDM_segmenter.cpp
${CATSMAT_DIR}/Segmentation/LocalBoundaryDetectionModel/src/IMUSANT_segmented_note_vectors.cpp
${CATSMAT_DIR}/Segmentation/LocalBoundaryDetectionModel/src/IMUSANT_segmented_part_LBDM.cpp
${CATSMAT_DIR}/Segmentation/LocalBoundaryDetectionModel/src/IMUSANT_segmented_profile_vectors.cpp
${CATSMAT_DIR}/Segmentation/LocalBoundaryDetectionModel/src/IMUSANT_weighted_strength_vectors.cpp




)




# old version of adding source code

#set (SRCFOLDERS


#   ${CATSMAT_DIR}/Analysis/src
#   ${CATSMAT_DIR}/CounterpointAnalysis/src
#   ${CATSMAT_DIR}/GeneralAnalysis/src
#   ${CATSMAT_DIR}/Segmentation/FixedPeriodDetection/src
#   ${CATSMAT_DIR}/Segmentation/LocalBoundaryDetectionModel/src
#   ${CATSMAT_DIR}/Application
#   ${CATSMAT_DIR}/Segmentation/LocalBoundaryDetectionModel/src
#   ${CATSMAT_DIR}/Segmentation
#   ${CATSMAT_DIR}/Utilities
#)


set (INCFOLDERS
${libIMUSANT_DIR}
${CATSMAT_DIR}/Analysis/inc
${CATSMAT_DIR}/Application
${CATSMAT_DIR}/CounterpointAnalysis/inc
${CATSMAT_DIR}/GeneralAnalysis/inc
${CATSMAT_DIR}/Segmentation
${CATSMAT_DIR}/Segmentation/FixedPeriodDetection/inc
${CATSMAT_DIR}/Segmentation/LocalBoundaryDetectionModel/inc
${CATSMAT_DIR}/Utilities
${libIMUSANT_DIR}/DomainObjects/inc
${libIMUSANT_DIR}/Utilities/inc
${libIMUSANT_DIR}/FileProcessing/inc
${libIMUSANT_DIR}/Converters/MusicXML_v3
${libIMUSANT_DIR}/Converters/MusicXML_v3/inc
${libIMUSANT_DIR}/Converters/MusicXML_v3/shared/inc
${IMUSANT_DIR}/DomainObjects/inc
${IMUSANT_DIR}/Converters/MusicXML_v3
${IMUSANT_DIR}/Converters/MusicXML_v3/inc
${IMUSANT_DIR}/Converters/Shared/inc
${IMUSANT_DIR}/FileProcessing/inc

${IMUSANT_DIR}/FileProcessing/Analysis/Segmentation/FixedPeriodDetection/
${IMUSANT_DIR}/Utilities/inc
${SUFFIXTREE_DIR}
${LIBMUSICXML_DIR}/libmusicxml-3.00-src/src
${LIBMUSICXML_DIR}/libmusicxml-3.00-src/src/lib
${LIBMUSICXML_DIR}/libmusicxml-3.00-src/src/visitors
${LIBMUSICXML_DIR}/libmusicxml-3.00-src/src/parser
${LOKI_DIR}
${SUFFIX_TREE_DIR}
${GOOGLE_TEST_INC_DIR}
)


#foreach(folder ${SRCFOLDERS})
# set(SRC ${SRC} "${folder}/*.cpp") # add source files
#endforeach(folder)
#file (GLOB CORESRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${SRC})



## is this necessary I think target link directories might do the job ?

foreach(folder ${INCFOLDERS})
set(HEADERS ${HEADERS} "${folder}/*.h") # add header files
set(INCL ${INCL} "${folder}") # add include folders
endforeach(folder)
 file (GLOB COREH RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${HEADERS})


###
# set includes ( is this needed ? )
include_directories( ${INCFOLDERS})
set_source_files_properties (${COREH} PROPERTIES HEADER_FILE_ONLY TRUE)


###
# set library target

#if(APPLE OR MSVC)

set(target catsmat)

# I don't know why these if statements are included they seem to do nothing '
#else(APPLE OR MSVC)
# set(target catsmat)
#endif(APPLE OR MSVC)

##if(MSVC)
## enable_language(RC)
## set(LIBCONTENT ${CORESRC} ${COREH}
${CATSMAT_DIR}/win32/libIMUSANT/libIMUSANT.rc)
##else(MSVC)
## set(LIBCONTENT ${CORESRC} ${COREH})
##endif(MSVC)

add_executable(${target} ${SRC} )

 add include directories
include_directories ( ${INCFOLDERS} )

###  Targeted Libraries ###

TARGET_LINK_LIBRARIES(${target} gtest)
TARGET_LINK_LIBRARIES(${target} ${BOOST_FILESYSTEM_LIB})
TARGET_LINK_LIBRARIES(${target} ${BOOST_SYSTEM_LIB})
TARGET_LINK_LIBRARIES(${target} libmusicxml2)
TARGET_LINK_LIBRARIES(${target} libIMUSANT)


set_target_properties (${target} PROPERTIES
FRAMEWORK TRUE
VERSION ${VERSION}
C_STANDARD 99
FRAMEWORK_VERSION ${VERSION}
PUBLIC_HEADER "${COREH}"
DEFINE_SYMBOL LIBMUSICXML_EXPORTS
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${STRVERS}
MACOSX_FRAMEWORK_BUNDLE_VERSION ${SSTRVERS}
)



###
# install setup
if(NOT APPLE)
install ( TARGETS ${target} ${TOOLS}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
FRAMEWORK DESTINATION "/Library/Frameworks" CONFIGURATIONS Release
PUBLIC_HEADER DESTINATION include/libmusicxml
)
endif(NOT APPLE)






-- 
www.seanwayland.com

Sean Wayland
-- 

Powered by www.kitware.com

Please keep messages on-topic and chec

[CMake] Cannot find source file:

2017-06-23 Thread Sean Wayland
properties (${COREH} PROPERTIES HEADER_FILE_ONLY TRUE)


###
# set library target
if(APPLE OR MSVC)
set(target catsmat)
else(APPLE OR MSVC)
set(target catsmat)
endif(APPLE OR MSVC)

##if(MSVC)
## enable_language(RC)
## set(LIBCONTENT ${CORESRC} ${COREH}
${CATSMAT_DIR}/win32/libIMUSANT/libIMUSANT.rc)
##else(MSVC)
## set(LIBCONTENT ${CORESRC} ${COREH})
##endif(MSVC)

add_executable(${target} ${SRC} )



###  Targeted Libraries ###

TARGET_LINK_LIBRARIES(${target} gtest)
TARGET_LINK_LIBRARIES(${target} ${BOOST_FILESYSTEM_LIB})
TARGET_LINK_LIBRARIES(${target} ${BOOST_SYSTEM_LIB})
TARGET_LINK_LIBRARIES(${target} libmusicxml2)
TARGET_LINK_LIBRARIES(${target} libIMUSANT)


set_target_properties (${target} PROPERTIES
FRAMEWORK TRUE
VERSION ${VERSION}
FRAMEWORK_VERSION ${VERSION}
PUBLIC_HEADER "${COREH}"
DEFINE_SYMBOL LIBMUSICXML_EXPORTS
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${STRVERS}
MACOSX_FRAMEWORK_BUNDLE_VERSION ${SSTRVERS}
)


###
# install setup
if(NOT APPLE)
install ( TARGETS ${target} ${TOOLS}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
FRAMEWORK DESTINATION "/Library/Frameworks" CONFIGURATIONS Release
PUBLIC_HEADER DESTINATION include/libmusicxml
)
endif()




www.seanwayland.com

Sean Wayland
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Multiple projects in a single repo

2017-06-18 Thread Sean Wayland
Hi Dushara and all ,
I am another Aussie working on something similar ( each of our
applications also has a test application also ) ..
At the moment we have :
add_subdirectory in the top level cmakelists file
In each subdirectory the cmakelists file adds targets ..
some of the subdirectories are for libraries
some are for executables .
As well as our own library we also use other libraries like gtest,
boost, libmusicxml
We have had a bit of luck but getting everything to link properly is tricky.
Please let me know if you get anywhere!
If anyone can shed some light it might save me a lot of time ..
Linking boost or gtest are pretty simple its the shared library we
have written ourselves which is giving me a headache!

Best Sean


On Sun, Jun 18, 2017 at 10:02 PM, Dushara Jayasinghe
<dush...@successful.com.au> wrote:
> Hi all,
>
> Here's a little puzzle that's got me scratching my head a bit. I've got a
> CMake project that is composed of two separate applications - let's call
> them system and recovery - that share a common library framework. I'd like
> to keep it all within a single repository.
>
> The applications are composed of multiple executables and shared libraries.
> What I would like to be able to do is to produces two install trees for the
> two applications with their respective library dependencies.
>
> Things I have attempted so far are:
>
> 1. Perform the build + install in sub-directories of each application:
>With this approach, the shared library files that the applications
>depend on don't get installed (they're in a sibling directory of the
>applications)
> 2. Creating two top level custom targets with the the application
>binaries as their dependencies: The build part works great (only the
>required binaries and libraries are built), but the install rule
>causes everything to be built (due to it's dependency on ALL)
>
> Method 2 seems promising if I can have a rule such as install/recovery or
> some such, but that doesn't seem possible for a custom target that doesn't
> generate anything.
>
> Has anyone else solved something like this before? Any suggestions?
>
> Thank you,
>
> Dushara
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake



-- 
www.seanwayland.com

Sean Wayland

licensed real estate salesperson
phone: 3475231455
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] linking boost to cmake under OSX 10.12.1 , boost 1.63 , cmake 2017.11

2017-05-03 Thread Sean Wayland
Hi all,

I am very new to cmake and boost. Sorry if my question is basic thanks for
your help in advance.

I am having trouble linking a project to boost. I am using OSX 10.12.1
I am using clion 2017.1.1

I installed boost on my machine using /bootstrap.sh
--prefix=/usr/local/boost --with-libraries=filesystem,system

I also tried a brew install boost also .

Boost can indeed be found here *usr/local/boost/ *on my machine.

I haven't had much luck getting boost to link properly.

I believe the project uses the filesystem and tuple modules.

I am getting this error

CMake Error at CMakeLists.txt:557 (ADD_EXECUTABLE):
  Cannot find source file:

anyExecutable.cpp

>From what I have read I think that if you are using OSX that you have to
use the FIND_PACKAGE command to link things properly. I suspect that the
code below doesn't work because I need to properly place the exact
filesystem location of the executable file created in the add_executable
command.
On a positive note I did get this message
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   program_options
-- Configuring done

I have tried various versions of these 2 cmakelists scripts below (A) and
(B)

Can anyone point me in the direction of a solution here?


*A) *

FIND_PACKAGE( Boost 1.63.0 COMPONENTS program_options REQUIRED )
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )

ADD_EXECUTABLE( anyExecutable anyExecutable.cpp )

TARGET_LINK_LIBRARIES( anyExecutable ${Boost_LIBRARIES} )

B)

INCLUDE_DIRECTORIES(*usr/local/boost/include/*)

ADD_EXECUTABLE( * anyExecutable myMain.cpp *)

TARGET_LINK_LIBRARIES( *anyExecutable usr/local/boost/lib/ *)

Thanks very much for your help .

Yours Sincerely
Sean Wayland

www.seanwayland.com
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake