Oded,
Your CMakeLists.txt file works for me. Maybe you just didn't run cmake
again?
Can you try on a clean directory just containing CMakeLists.txt and
step-1.cc?
Best,
Daniel
Am Dienstag, 9. August 2016 11:38:54 UTC+2 schrieb Oded Yaakobi:
>
> HI Daniel,
>
> I tried your suggestion but it didn't work for me. See the attached
> "CMakeLists.txt" file. I get the following error messages:
>
> [ yaakobioy L02029080
> ~/dealii/dealii-8-5-0pre-v2/dealii-8-5-0pre-v2-Install/examples/step-1-mod
> ]$ make debug
>
> make: *** No rule to make target `debug'. Stop.
>
> [ yaakobioy L02029080
> ~/dealii/dealii-8-5-0pre-v2/dealii-8-5-0pre-v2-Install/examples/step-1-mod
> ]$ make release
>
> make: *** No rule to make target `release'. Stop.
>
> Thanks,
> Oded
>
>
> On Tuesday, August 9, 2016 at 12:00:22 PM UTC+3, Daniel Arndt wrote:
>>
>> Oded,
>>
>> If you include
>>
>> ADD_CUSTOM_TARGET(debug
>> COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR}
>> COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target all
>> COMMENT "Switch CMAKE_BUILD_TYPE to Debug"
>> )
>>
>> ADD_CUSTOM_TARGET(release
>> COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR}
>> COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target all
>> COMMENT "Switch CMAKE_BUILD_TYPE to Release"
>> )
>>
>> into your CMakeLists.txt, you can switch between debug and release mode
>> using
>> $make debug
>> and
>> $make release
>>
>> Best,
>> Daniel
>>
>> Am Dienstag, 9. August 2016 10:36:39 UTC+2 schrieb Oded Yaakobi:
>>>
>>>
>>> Hi Denis,
>>>
>>> I tried your suggestion to drop DEAL_II_INVOKE_AUTOPILOT(), and it
>>> worked.
>>> However, if I want to keep the functionality of switching the build
>>> types between "Debug" and "Release" versions, how can I do it now?
>>>
>>> Thanks,
>>> Oded
>>>
>>>
>>> On Monday, August 8, 2016 at 11:08:14 PM UTC+3, Denis Davydov wrote:
>>>>
>>>> Hi Ode,
>>>>
>>>> First, Spack is a tool to compile and install packages, which I don't
>>>> think you are using as you said that
>>>> you play around with Luca's build. So the link to this wiki should not
>>>> be relevant here.
>>>>
>>>> Second, you CMake input is wrong. you need to drop
>>>>
>>>> DEAL_II_INVOKE_AUTOPILOT()
>>>>
>>>> see the very first example here
>>>> https://www.dealii.org/developer/users/cmakelists.html#cmakesimple
>>>>
>>>> My understanding is that DEAL_II_INVOKE_AUTOPILOT is for very simple
>>>> cases like examples/ which don't
>>>> need to link against other than deal.II libraries and where one needs a
>>>> single executable.
>>>> If you are working on something like you PhD code, then it's most
>>>> likely better to keps things are
>>>> you library + unit tests + executable which calls you main class with
>>>> parameter file.
>>>>
>>>> Regards,
>>>> Denis.
>>>>
>>>> On Monday, August 8, 2016 at 12:54:02 PM UTC+2, Oded Yaakobi wrote:
>>>>>
>>>>> Dear group,
>>>>>
>>>>>
>>>>>
>>>>> I apologize if my question below has already been addressed in the one
>>>>> of deal.ii’s documentation resources, but I didn't understand how to
>>>>> answer
>>>>> it using the pieces of documentation that I have read such as
>>>>>
>>>>> “How to use CMake to configure your projects with deal.II”
>>>>> https://www.dealii.org/developer/users/cmakelists.html#cmakeauto
>>>>>
>>>>>
>>>>>
>>>>> and
>>>>>
>>>>> “deal.II in Spack”
>>>>> https://github.com/dealii/dealii/wiki/deal.II-in-Spack
>>>>>
>>>>>
>>>>>
>>>>> I am trying to embed a short Python script in my code, but get an
>>>>> error message after running “make release”. Attached are an example code
>>>>> with a minor addition to the “main” of Step-1 and the “CMakeLists.txt”
>>>>> file
>>>>> that I tried to adapt to support Python.
>>>>>
>>>>>
>>>>>
>>>>> I am running my code on a MAC OS Yosemite 10.10.5 with the special
>>>>> version of deal.ii that Luca prepared for me
>>>>> https://groups.google.com/forum/#!searchin/dealii/%22Make$20test%22$20failure$20following$20Trilinos$20installation$20with$20Mesquite%7Csort:relevance/dealii/Y7MH_BE0yko/1zvnHGR7AQAJ
>>>>>
>>>>> <https://groups.google.com/forum/%23!searchin/dealii/%22Make$20test%22$20failure$20following$20Trilinos$20installation$20with$20Mesquite%7Csort:relevance/dealii/Y7MH_BE0yko/1zvnHGR7AQAJ>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Here are the error messages that I get:
>>>>>
>>>>>
>>>>>
>>>>> [ yaakobioy L02029080
>>>>> ~/dealii/dealii-8-5-0pre-v2/dealii-8-5-0pre-v2-Install/examples/step-1-mod
>>>>>
>>>>> ]$ make release
>>>>>
>>>>> CMake Error at
>>>>> /Users/yaakobioy/dealii/dealii-8-5-0pre-v2/dealii-8-5-0pre-v2-Install/share/deal.II/macros/macro_deal_ii_invoke_autopilot.cmake:57
>>>>>
>>>>> (ADD_EXECUTABLE):
>>>>>
>>>>> add_executable cannot create target "step-1" because another target
>>>>> with
>>>>>
>>>>> the same name already exists. The existing target is an executable
>>>>> created
>>>>>
>>>>> in source directory
>>>>>
>>>>>
>>>>> "/Users/yaakobioy/dealii/dealii-8-5-0pre-v2/dealii-8-5-0pre-v2-Install/examples/step-1-mod".
>>>>>
>>>>> See documentation for policy CMP0002 for more details.
>>>>>
>>>>> Call Stack (most recent call first):
>>>>>
>>>>> CMakeLists.txt:49 (DEAL_II_INVOKE_AUTOPILOT)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -- Configuring incomplete, errors occurred!
>>>>>
>>>>> See also
>>>>> "/Users/yaakobioy/dealii/dealii-8-5-0pre-v2/dealii-8-5-0pre-v2-Install/examples/step-1-mod/CMakeFiles/CMakeOutput.log".
>>>>>
>>>>> make: *** [cmake_check_build_system] Error 1
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I would appreciate if someone could explain what should I do to
>>>>> overcome this problem.
>>>>>
>>>>>
>>>>>
>>>>> Thanks in advance,
>>>>> Oded
>>>>>
>>>>
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.