[CMake] Build tool mode with MSBuild not ignoring targets excluded from default

2017-05-04 Thread Kim Kryger
Hello all,
I am using the Build Tool Mode in CMake 3.7.1 to build INSTALL targets in a
MSVC11 build folder. According to the documentation (and the output from
MSBuild), it should be building 'default targets' only, but it doesn't
specify what that means exactly.

The command I am running:
cmake.exe --build vc110 --target INSTALL --config Release_mdd

This is building every single target in the solution, even if they have
been turned off by EXCLUDE_FROM_DEFAULT_BUILD,
EXCLUDE_FROM_DEFAULT_BUILD_, or even EXCLUDE_FROM_ALL. Seemingly
the only way I can prevent the excluded project from being built is to
remove the target as a dependency on other targets, or invoke MSBuild with
the solution file directly, which isn't very cross-platform friendly, and
I'd prefer to utilize CMake's knowledge of the build tools than write my
own MSBuild finder.


More information:
I have a runtime library and a plugin that is loaded in an executable. The
runtime library is being built for multiple configurations (Release, Debug,
Release_mdd, Debug_md), but the plugin is only supposed to build in Release
and Debug. I have excluded the plugin from the default build:
SET( CMAKE_CONFIGURATION_TYPES "Release;Release_mdd;Debug;Debug_md" )
...
SET_TARGET_PROPERTIES( MyPlugin PROPERTIES
EXCLUDE_FROM_DEFAULT_BUILD_RELEASE_MDD 1
EXCLUDE_FROM_DEFAULT_BUILD_DEBUG_MD 1
)


I can call MSBuild with the solution file, and it correctly ignores the
builds that are marked as excluded, but AFAIK CMake's build tool mode
doesn't support this right now, I believe because of the usage of the
References in ALL BUILD causes all referenced projects to be built,
regardless of the solution configuration ('fixable' by
using /p:BuildProjectReferences=false as an option to MSBuild)


Looking through the code
(cmGlobalVisualStudio10Generator::GenerateBuildCommand), it seems I can
'spoof' it into using the sln and ignoring the ALL_BUILD vcxproj file
completely if I specify 'clean' as the target, and then add /t:Build to the
end of the command line. I'd rather not do this, as it doesn't remove the
'clean' option.

I guess my question is if the build tool mode is making assumptions about
what file I want it to build with?

As a workaround, is there an option to force it to use devenv for the time
being?

Thanks,
Kim
-- 

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] CPack not detecting pkgbuild or product build

2017-05-04 Thread Ayla Khan
OK, good to know.

Best,

Ayla

> On May 4, 2017, at 6:09 AM, Robert Maynard  wrote:
> 
> Hi,
> 
> By default the NSIS generator is enabled. 
> 
> On Wed, May 3, 2017 at 6:39 PM, Ayla Khan  > wrote:
> That worked - thank you! Do I need to add NSIS manually for Windows 
> installers as well? It looks like CMake finds NSIS without any difficulty but 
> I’d rather be sure.
> 
> Thanks,
> 
> Ayla
> 
>> On May 3, 2017, at 2:56 PM, Robert Maynard > > wrote:
>> 
>> You will need to append the productbuild type to you CPACK_GENERATOR so it 
>> would look like SET(CPACK_GENERATOR "productbuild;STGZ;TGZ")
>> 
>> On Wed, May 3, 2017 at 4:14 PM, Ayla Khan > > wrote:
>> Thank you Robert. The CPACK_GENERATOR variable is currently set to 
>> “STGZ;TGZ”. When I installed Xcode, I made sure using xcode-select that the 
>> usual command line tools were installed. I can find productbuild in my PATH, 
>> but CPACK_BINARY_PRODUCTBUILD is off in CPackConfig.cmake. Do I need to 
>> explicitly set CPACK_BINARY_PRODUCTBUILD in my CMakeLists.txt, or do I 
>> append a type for packages to CPACK_GENERATOR? I assumed CPACK_GENERATOR was 
>> generated automatically.
>> 
>> Also, I’ve been working with Xcode 8 on OS X 10.11.6, and CPack is ignoring 
>> productbuild completely even if I set it using the generator flag. Command 
>> line tools were also set up using xcode-select.
>> 
>> Thanks,
>> 
>> Ayla
>> 
>> > On May 3, 2017, at 1:12 PM, Robert Maynard > > > wrote:
>> >
>> > Hi Ayla,
>> >
>> > The packages that are built when executing "make package" is determined by 
>> > the variable "CPACK_GENERATOR" inside your CPackConfig.cmake ( generally 
>> > located in the root of your build directory as it is configured ).
>> >
>> >
>> > On Fri, Apr 7, 2017 at 3:44 PM, Ayla Khan > > > wrote:
>> > I’m trying to build a Mac OS X installer package on 10.10.5 using Xcode 
>> > 7.2 tools with the CPack that ships with CMake 3.7.2. I can generate a 
>> > package from the CMake build directory if I call cpack directly on the 
>> > command line with -G productbuild, but not through the CMake build using 
>> > make package. Is there a CPack setting I need or some other build 
>> > configuration information? Is the Xcode version too old?
>> >
>> > Thanks,
>> >
>> > Ayla
>> > --
>> >
>> > 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 
>> > 
>> >
>> 
>> 
> 
> 

-- 

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] avoiding finding system libraries (motivation is superbuilds)

2017-05-04 Thread Kris Thielemans
Hi

 

Short question: if we have a library/include files installed both in the
usual system locations and outside, how do we force CMake to find the
latter? (without modifying the CMake files of the project).

 

Motivation:

We're trying to make a SuperBuild that builds/downloads a specific version
of various packages (such as Boost and GTest). Our motivation is to have
complete control of the version. We don't want to install this in standard
locations to avoid clashes, root permissions etc.  So let's say we install
our versions in ~/our_stuff/lib, ~/our_stuff/include etc

 

It seems very hard (and sometimes impossible) however to let future
find_packages find our own versions as opposed to the system ones. From
https://cmake.org/cmake/help/latest/command/find_library.html I thought that
doing something like this would work

 

cmake ../ -DCMAKE_INSTALL_PREFIX=~/our_stuff

 

but the system version of boost etc are still found first (it does work if
there is no system version of the library). In the case of Boost, even 

 

cmake ../ -DCMAKE_INSTALL_PREFIX=~/our_stuff -DBOOST_ROOT=~/our_stuff

 

doesn't help (tested on Linux). I have to set BOOST_INCLUDEDIR for instance.
As every Find*.cmake has its own conventions of specifying cmake/environment
variables, and some don't at all, this just gets unfeasible.

 

I know about NO_DEFAULT_PATH, NO_CMAKE_SYSTEM_PATH etc options for
find_package, but this would need modification of CMake files in the
dependent packages which is quite undesirable for us.

 

Any suggestions?

 

Thanks

Kris

 

-- 

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] Inconsistent parsing of bracket comments in command arguments

2017-05-04 Thread Volo Zyko
Hi,

I've encountered the following behavior. Code like 'set(FOO#[[bar]]
1)' is parsed fine by cmake, but for the code 'set(FOO #[[bar]]1)'
cmake reports:

  Syntax Error in cmake code at column 13

  Argument not separated from preceding token by whitespace.

Is this by design or just an omission? As for me either separation
should be required on both sides of bracket comment or it should allow
to omit separation on both sides too.


 Volo Zyko
-- 

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] How to get list of target dependencies?

2017-05-04 Thread Robert Dailey
Forgot to mention, I'm using CMake 3.8.1

On Thu, May 4, 2017 at 10:47 AM, Robert Dailey  wrote:
> How can I get a list of target dependencies of a target? For example,
> if I have 3 library targets that depend on each other like this:
>
> A -> B -> C
>
> When I ask for the target dependencies for A, I should get a list back
> with B in it. Basically this would be the same list I pass to
> target_link_libraries(), minus actual library files with no
> corresponding target known to CMake.
>
> I see a LINK_DEPENDS target property. Is this what I want?
-- 

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] How to get list of target dependencies?

2017-05-04 Thread Robert Dailey
How can I get a list of target dependencies of a target? For example,
if I have 3 library targets that depend on each other like this:

A -> B -> C

When I ask for the target dependencies for A, I should get a list back
with B in it. Basically this would be the same list I pass to
target_link_libraries(), minus actual library files with no
corresponding target known to CMake.

I see a LINK_DEPENDS target property. Is this what I want?
-- 

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] What is ANDROID_JAVA_SOURCE_DIR for?

2017-05-04 Thread Robert Dailey
I am seeing hints of ANT / JAVA support for Android in 3.8.1
documentation. Essentially there is a whole list of properties that
have unexplained use cases under Properties for Targets. I see
ANDROID_JAVA_SOURCE_DIR, for example. What are these for? Will CMake
actually do the "ant release" command for you? I've been using custom
targets to do the java build & packaging steps for Android.
-- 

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] CPack not detecting pkgbuild or product build

2017-05-04 Thread Robert Maynard
Hi,

By default the NSIS generator is enabled.

On Wed, May 3, 2017 at 6:39 PM, Ayla Khan  wrote:

> That worked - thank you! Do I need to add NSIS manually for Windows
> installers as well? It looks like CMake finds NSIS without any difficulty
> but I’d rather be sure.
>
> Thanks,
>
> Ayla
>
> On May 3, 2017, at 2:56 PM, Robert Maynard 
> wrote:
>
> You will need to append the productbuild type to you CPACK_GENERATOR so
> it would look like SET(CPACK_GENERATOR "productbuild;STGZ;TGZ")
>
> On Wed, May 3, 2017 at 4:14 PM, Ayla Khan  wrote:
>
>> Thank you Robert. The CPACK_GENERATOR variable is currently set to
>> “STGZ;TGZ”. When I installed Xcode, I made sure using xcode-select that the
>> usual command line tools were installed. I can find productbuild in my
>> PATH, but CPACK_BINARY_PRODUCTBUILD is off in CPackConfig.cmake. Do I need
>> to explicitly set CPACK_BINARY_PRODUCTBUILD in my CMakeLists.txt, or do I
>> append a type for packages to CPACK_GENERATOR? I assumed CPACK_GENERATOR
>> was generated automatically.
>>
>> Also, I’ve been working with Xcode 8 on OS X 10.11.6, and CPack is
>> ignoring productbuild completely even if I set it using the generator flag.
>> Command line tools were also set up using xcode-select.
>>
>> Thanks,
>>
>> Ayla
>>
>> > On May 3, 2017, at 1:12 PM, Robert Maynard 
>> wrote:
>> >
>> > Hi Ayla,
>> >
>> > The packages that are built when executing "make package" is determined
>> by the variable "CPACK_GENERATOR" inside your CPackConfig.cmake ( generally
>> located in the root of your build directory as it is configured ).
>> >
>> >
>> > On Fri, Apr 7, 2017 at 3:44 PM, Ayla Khan  wrote:
>> > I’m trying to build a Mac OS X installer package on 10.10.5 using Xcode
>> 7.2 tools with the CPack that ships with CMake 3.7.2. I can generate a
>> package from the CMake build directory if I call cpack directly on the
>> command line with -G productbuild, but not through the CMake build using
>> make package. Is there a CPack setting I need or some other build
>> configuration information? Is the Xcode version too old?
>> >
>> > Thanks,
>> >
>> > Ayla
>> > --
>> >
>> > 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
>> >
>>
>>
>
>
-- 

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] When Ninja byproduct is a directory causes `clean` target to fail.

2017-05-04 Thread Dan Liew
Hi,

I recently added support to a project to build its API documentation [1].

The documentation is generated by doxygen.
I used `add_custom_command()` to run doxygen and I use `BYPRODUCTS` to
specify the output directory that will be generated by doxygen in the
hope that this would tell ninja to remove it when the `clean` target
is run.

However this doesn't work because ninja complains that the directory
isn't empty.
Is `BYPRODUCTS` not supposed to be used with directories, or is this a bug?


[1] 
https://github.com/Z3Prover/z3/blob/a9d6ef68f02d636d9628a52a257d968a13321752/contrib/cmake/doc/CMakeLists.txt#L59

Thanks,
Dan.
-- 

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] Circular dependencies with Ninja, not with Unix Makefiles

2017-05-04 Thread Ignacio Fernández Galván via CMake

Hello,

I have a project where circular dependencies are generated when I use 
the Ninja generator, but not the default Unix Makefiles. I could create 
a minimal test like this:


$ cat CMakeLists.txt
add_subdirectory (ext ${PROJECT_BINARY_DIR}/ext)

$ cat ext/CMakeLists.txt
set (OUT ${CMAKE_CURRENT_LIST_DIR})

add_custom_command (OUTPUT ${OUT}/foo
COMMAND touch ${OUT}/foo
)

add_custom_target (foo ALL
DEPENDS ${OUT}/foo
)

add_custom_command (TARGET foo
POST_BUILD
COMMAND cp ${OUT}/foo ${CMAKE_BINARY_DIR}/foo
)

$ touch ext/bar

$ cmake -G Ninja .
[...]

$ ninja
ninja: warning: multiple rules generate ext/foo. builds involving this 
target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: error: dependency cycle: ext/foo -> ext/CMakeFiles/foo.util -> 
ext/CMakeFiles/foo -> ext/foo


I used a freshly compiled CMake 3.8 and the latest binary ninja from 
https://github.com/Kitware/ninja/releases.


Ignacio
--

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] DLL handling under CMake

2017-05-04 Thread lectem
I managed to get it working by using an intermediate script.
One might want to generate the script instead of using the « RUN_IT » variable 
trick.
This was only tested on Windows, but seems to work fine.
Put the following code in a xx.cmake file, include it from your 
CMakeLists.txt and enjoy.


# This is a helper script to run BundleUtilities fixup_bundle as postbuild
# for a target. The primary use case is to copy .DLLs to the build directory for
# the Windows platform. It allows generator expressions to be used to determine
# the binary location
#
# Usage : run_fixup(TARGET LIBS DIRS)
# - TARGET : A cmake target
# - See fixup_bundle for LIBS and DIRS arguments

if(RUN_IT)
# Script ran by the add_custom_command
include(BundleUtilities)
fixup_bundle("${TO_FIXUP_FILE}" "${TO_FIXUP_LIBS}" "${TO_FIXUP_DIRS}")
# End of script ran by the add_custom_command
else()

set(THIS_FILE ${CMAKE_CURRENT_LIST_FILE})
message(${THIS_FILE})
function(run_fixup _target _libs _dirs)
message(${THIS_FILE})
add_custom_command(
TARGET ${_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -DRUN_IT:BOOL=ON 
-DTO_FIXUP_FILE=$ -DTO_FIXUP_LIBS=${_libs} 
-DTO_FIXUP_DIRS=${_dirs}  -P ${THIS_FILE}
COMMENT "Fixing up dependencies for ${_target}"
VERBATIM
)

endfunction()

endif()


De : Clément Gregoire
Envoyé le :jeudi 4 mai 2017 08:37
À : Hendrik Sattler; Louis-Paul CORDIER; Cmake Mailing List
Objet :Re: [CMake] DLL handling under CMake

I'd also be interested in this. I saw an old mail in the ML about this, but it 
seems fixup_bundle is old and cant use generator expressions, making it hard to 
use (I don't want to hardcode the executable path).

Do you have a sample for this ?
CMake would really benefit from having those features made more accessible 
instead of everyone having to write its own script 
Le sam. 29 avr. 2017 22:10, Hendrik Sattler  a écrit :


Am 27. April 2017 10:43:50 MESZ schrieb Louis-Paul CORDIER 
:
>This steps are tedious and I'm wondering if there is a mechanism that
>exists or that have to be imagined to make the DLL nightmare end.

I use BundleUtilities to achieve the copying of DLL files to the installation 
directory. The main problem for this is to enumerate the needed directories.

I use the same for copying DLL files to the output directory to ease debugging.

The advantage is the inspection of the exe for really needed DLL files. This 
AUTOMATICALLY handles the case debug vs. release.

HS

--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
--

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

-- 

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